package com.aim.common.util;

import com.aim.common.handler.FitContextHolder;
import com.aim.common.handler.FitProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

/**
 * 验证码工具类
 */
public class KaptchaUtil {

    /**
     * 获取验证码开关
     */
    @ConditionalOnProperty(prefix = "fit", name = "kaptcha-open", havingValue = "false")
    public static Boolean getKaptchaOnOff() {
        return FitContextHolder.getBean(FitProperties.class).getKaptchaOpen();
    }
}